package client.core.io.conection;

import java.io.BufferedReader;
import java.io.IOException;

import client.ui.workform.DialogForm;

public class ReadInputStream implements Runnable {
	
	protected BufferedReader inputStream;
	protected DialogForm dialogTextArea   = null;
	
	public ReadInputStream(BufferedReader inputStream,DialogForm dialogTextArea ){
		this.inputStream = inputStream;
		this.dialogTextArea = dialogTextArea;
	}
	@Override
	public void run() {
		try {
			while(true){
        		String mesage;
        		mesage = inputStream.readLine();
        		this.dialogTextArea.jTextAreaShowMessages .append("\n"+mesage);
        	}
		}catch (IOException e) {
            e.printStackTrace();
        }	 
		
	}

}
